# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-prawcore
pkgver=2.3.0
pkgrel=4
pkgdesc="Low-level communication layer for PRAW 4+."
arch=('any')
license=('BSD')
url="https://github.com/praw-dev/prawcore"
depends=('python-requests')
makedepends=('python-setuptools')
checkdepends=('python-mock' 'python-betamax-matchers' 'python-betamax-serializers'
              'python-testfixtures')
source=("$pkgname-$pkgver.tar.gz::https://github.com/praw-dev/prawcore/archive/v$pkgver.tar.gz")
sha512sums=('e6330ed370d987720c257913ca521ddd9129aea857792e9a17b9864c275034b795b2a577f4c2235877b165df91f0898bd8e4372b59224d6eb36d5efaa4a2d3f6')

check() {
  cd prawcore-$pkgver
  python setup.py test
}

package() {
  cd prawcore-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
  install -Dm644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt
}
